#!/bin/sh
set -e

if [ "$1" = "" ]; then
  echo "Usage: rpm_setup <App Version>"
  echo "eg: rpm_setup 1.0.0"
  exit 1
fi

sudo alien -r -c -v --test ../lmc_$1_$(arch)$PACKAGE_MODE.deb
sudo mv -f -v lmc-$1-2.$(arch).rpm lmc-$1.$(arch)$PACKAGE_MODE.rpm
sudo mv -f -v lmc-$1.$(arch)$PACKAGE_MODE.rpm ../

exit 0